import java.io.*;

public class compData {

    public static void main(String [] arg) {
        boolean error = false;
	
        try {
	    File f = new File("as0_r.rx");
            FileInputStream fi = new FileInputStream(f);
            DataInputStream data = new DataInputStream(fi);
	    
	    byte [] b1 = new byte[(int) f.length()];
            data.read(b1, 0, b1.length);
	    
	    data.close();
	    fi.close();
	    
	    f = new File("as0_c.tx");
	    fi = new FileInputStream(f);
	    data = new DataInputStream(fi);
	    
	    byte [] b2 = new byte[b1.length];
	    data.read(b2, 0, b1.length);
	    
	    data.close();
	    fi.close();
	    
	    for(int i = 0;i < b1.length;i++) {
	        if(b1[i] != b2[i]) {
		    System.out.println("Error in data transmited from " +
		        "ATUC to ATUR at channel AS0");
		    error = true;
		    break;
		}
	    }

	    f = new File("ls0_r.rx");
            fi = new FileInputStream(f);
            data = new DataInputStream(fi);
	    
	    b1 = new byte[(int) f.length()];
            data.read(b1, 0, b1.length);
	    
	    data.close();
	    fi.close();
	    
	    f = new File("ls0_c.tx");
	    fi = new FileInputStream(f);
	    data = new DataInputStream(fi);
	    
	    b2 = new byte[b1.length];
	    data.read(b2, 0, b1.length);
	    
	    data.close();
	    fi.close();
	    
	    for(int i = 0;i < b1.length;i++) {
	        if(b1[i] != b2[i]) {
		    System.out.println("Error in data transmited from " +
		        "ATUC to ATUR at channel LS0");
		    error = true;
		    break;
		}
	    }

	    f = new File("ls0_c.rx");
            fi = new FileInputStream(f);
            data = new DataInputStream(fi);
	    
	    b1 = new byte[(int) f.length()];
            data.read(b1, 0, b1.length);
	    
	    data.close();
	    fi.close();
	    
	    f = new File("ls0_r.tx");
	    fi = new FileInputStream(f);
	    data = new DataInputStream(fi);
	    
	    b2 = new byte[b1.length];
	    data.read(b2, 0, b1.length);
	    
	    data.close();
	    fi.close();
	    
	    for(int i = 0;i < b1.length;i++) {
	        if(b1[i] != b2[i]) {
		    System.out.println("Error in data transmited from " +
		        "ATUR to ATUC at channel LS0");
		    error = true;
		    break;
		}
	    }
	    	    
	}
	catch(IOException ex) {
	    System.out.println(ex);
	}
	
	if(!error) System.out.println("Data Transmited OK");
    }
}
